import Vue from 'vue'
import Lodash from 'lodash'

const filters = require.context(
	'./',
	false,
	/\.js$/
);

filters.keys().forEach(fileName => {
	if (!fileName.includes('index')) {
		const name = fileName.split('/').pop().replace(/\.\w+$/, '');
		// const Time = require(`${fileName}`);
		Vue.filter(
			Lodash.camelCase(name),
			// Time.default || Time
			filters(fileName).default || filters(fileName)
		);
	}
});